package com.yx.changdao.common.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.yx.changdao.common.annotation.AutoFill;
import com.yx.changdao.common.utils.SysUtils;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.util.Date;

@Getter
@Setter
@TableName(NoWorkday.TABLE_NAME)
public class NoWorkday implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 数据库名
     */
    public static final String TABLE_NAME = "no_workday";

    /**
     * 非工作日
     */
    public static final String NO_WORKDAY = "no_workday";
    /**
     * 创建日期
     */
    public static final String CREATE_TIME = "create_time";
    /**
     * 创建人
     */
    public static final String CREATE_BY = "create_by";
    /**
     * 更新日期
     */
    public static final String UPDATE_TIME = "update_time";
    /**
     * 更新人
     */
    public static final String UPDATE_BY = "update_by";
    /**
     * 更新人
     */
    public static final String DAY_TIMESTAMP = "day_timestamp";

    /**
     * 非工作日
     */
    @TableId(type = IdType.INPUT)
    private String noWorkday;
    /**
     * 创建日期
     */
    @AutoFill
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;
    /**
     * 创建人
     */
    @AutoFill(klass = SysUtils.class, method = "currentUserId")
    @TableField(fill = FieldFill.INSERT)
    private String createBy;
    /**
     * 更新日期
     */
    @AutoFill
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;
    /**
     * 更新人
     */
    @AutoFill(klass = SysUtils.class, method = "currentUserId")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private String updateBy;

    /**
     * 时间戳
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Long dayTimestamp;

}
